﻿using System.Collections.Generic;
using System.ServiceModel;
using System.ServiceModel.Web;
using Acaweb.Model.Entities;

namespace Acaweb.Servicios.Contracts
{
    // NOTE: You can use the "Rename" command on the "Refactor" menu to change the interface name "IMunicipiosService" in both code and config file together.
    [ServiceContract]
    public interface IMunicipiosService
    {
        /// <summary>
        /// Provee la lista de todos los municipios registrados
        /// </summary>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetAll", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Municipios> GetAll();

        /// <summary>
        /// Provee los municipios de un departamento o estado
        /// </summary>
        /// <param name="CodigoDepartamento"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetByDepartamento", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Municipios> GetByDepartamento(int CodigoDepartamento);

        /// <summary>
        /// Provee un único municipio
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        [WebInvoke(Method = "POST", UriTemplate = "GetById", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        Municipios GetById(int Id);

        [WebInvoke(Method = "POST", UriTemplate = "GetByNombreDepartamento", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Municipios> GetByNombreDepartamento(string Departamento);

        [WebInvoke(Method = "POST", UriTemplate = "GetByNombre", RequestFormat = WebMessageFormat.Json, ResponseFormat = WebMessageFormat.Json)]
        [OperationContract]
        List<Municipios> GetByNombre(string Nombre);
    }
}
